<!DOCTYPE html>
<html lang="en">
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>上课显示</title>
</head>
<body>
<div th:include="/nav.html"></div>
<h1>排课管理</h1><hr>
<div style="display: flex">
    <div style="width: 75%">
        <table class="table" style="width: 90%">
            <tr>
                <td>教师ID</td>
                <td>教师名称</td>
                <td>班级ID</td>
                <td>班级名称</td>
                <td>课程ID</td>
                <td>课程名称</td>
                <td>节操</td>
            </tr>
            <tr th:each="ta :${tasks}">
                <td th:text="${ta.user.uid}"></td>
                <td th:text="${ta.user.uname}"></td>
                <td th:text="${ta.clz.clzno}"></td>
                <td th:text="${ta.clz.clzname}"></td>
                <td th:text="${ta.course.cno}"></td>
                <td th:text="${ta.course.cname}"></td>
                <td><a th:href="'/adm/task/delete/'+${ta.kid}">删除</a></td>
            </tr>
        </table>
    </div>
    <div style="width: 20%">
        <p>排课添加</p><hr>
        <form action="/adm/task/add" method="post">
            <p><select name="tid">
                <option th:each="us : ${users}"
                th:text="${us.uname}"
                th:value="${us.uid}">
                </option>
            </select></p>
            <p><select name="clzno">
                <option th:each="cl : ${clzs}"
                        th:text="${cl.clzname}"
                        th:value="${cl.clzno}">
                </option>
            </select></p>
            <p><select name="cno">
                <option th:each="co : ${courses}"
                        th:text="${co.cname}"
                        th:value="${co.cno}">
                </option>
            </select></p>
            <p><input type="submit"></p>
        </form>
    </div>
</div>
</body>
</html>